<script lang="ts" setup>
import { newsType2 } from "../../../utils/ts/news";

const { item } = defineProps<{ item: newsType2 }>();

// const toDetail = () => {
//   window.location.href = "/#/index/newsDetail";
// };
</script>
<template>
  <div class="border-b-1 p-y-5 p-x-5 flex">
    <div class="h-50 mr-5 hidden md:block">
      <img src="/index/news.svg" alt="" class="h-full" />
    </div>
    <div class="flex flex-col justify-center h-50">
      <p class="text-1xl">
        {{ item.title }}
      </p>

      <p>
        <span class="text-sm text-gray-600 leading-6">
          {{ item.content }}
        </span>
        <router-link class="text-blue-700 float-right text-sm pr-3" to="/index/newsDetail">
          查看详情
        </router-link>
      </p>
    </div>
  </div>
</template>
<style lang="scss" scoped></style>
